package com.hk.commons.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.hk.commons.entity.product.ProductInfo;
import org.hibernate.annotations.GenericGenerator;
import org.omg.CORBA.ORB;

/**
 * 
 * Title:Organization 
 * Description:组织信息表 
 * Company:HK
 * 
 * @author Sam
 * @date 2016年2月18日下午12:29:17
 */
@Entity
@Table(name = "t_organization")
public class Organization implements java.io.Serializable,  Comparable<Organization> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6854607948475490952L;

	@Id
	@GeneratedValue (generator =  "paymentableGenerator" )    
    @GenericGenerator (name =  "paymentableGenerator" , strategy =  "increment" )
	private Integer id;

	/** 父节点 */
	private Integer parentID;
	
	/** 组织结构类别
	 * 1 : 集团
	 * 2 : 公司
	 * 3 : 部门
	 * 4 : 职务
	 * */
	private Integer orgType;
	
	
	/** 助记码 */
	private String code;
	
	/** 创建人*/
	private Long creator;
	
	/** 该子节点名称 */
	private String name;

	/**
	 * 该节点全名
	 */
	private String fullName;

	/** 记录创建时间 */
	private Long cts;

	/** 记录修改时间 */
	private Long updatedts;



	/** 是否是部门负责人 **/
	private Integer isHeader;

	/**
	 * 当前状态：0 已删除， 1 在使用
	 */
	private int status = 1;


	/**
	 * 组织架构类型， 1：普通部门， 2：无主客户服务部
	 */

	private int depType ;

	/**
	 * 所属渠道
	 */
	private Integer channel;

	private String flag01;

	/**
	 * 该节点全名
	 */
	private String flag02;

	public Integer getChannel() {
		return channel;
	}

	public void setChannel(Integer channel) {
		this.channel = channel;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getParentID() {
		return parentID;
	}

	public void setParentID(Integer parentID) {
		this.parentID = parentID;
	}

	public Integer getOrgType() {
		return orgType;
	}

	public void setOrgType(Integer orgType) {
		this.orgType = orgType;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getCts() {
		return cts;
	}

	public void setCts(Long cts) {
		this.cts = cts;
	}

	public Long getUpdatedts() {
		return updatedts;
	}

	public void setUpdatedts(Long updatedts) {
		this.updatedts = updatedts;
	}



	public Integer getIsHeader() {
		return isHeader;
	}

	public void setIsHeader(Integer isHeader) {
		this.isHeader = isHeader;
	}

	public String getFlag01() {
		return flag01;
	}

	public void setFlag01(String flag01) {
		this.flag01 = flag01;
	}

	public String getFlag02() {
		return flag02;
	}

	public void setFlag02(String flag02) {
		this.flag02 = flag02;
	}

	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}


	public int getDepType() {
		return depType;
	}

	public void setDepType(int depType) {
		this.depType = depType;
	}

	@Override
	public String toString() {
		return "Organization{" +
				"id=" + id +
				", parentID=" + parentID +
				", orgType=" + orgType +
				", code='" + code + '\'' +
				", creator=" + creator +
				", name='" + name + '\'' +
				", fullName='" + fullName + '\'' +
				", cts=" + cts +
				", updatedts=" + updatedts +
				", isHeader=" + isHeader +
				", status=" + status +
				", depType=" + depType +
				", channel=" + channel +
				", flag01='" + flag01 + '\'' +
				", flag02='" + flag02 + '\'' +
				'}';
	}

	@Override
	public int compareTo(Organization  o) {
		return o.getId().compareTo(this.getId());
	}
}
